package com.zsix.api.controller;

import com.alibaba.fastjson.JSONObject;
import com.zsix.common.util.ResultRes;
import com.zsix.system.service.IWordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletResponse;

@RestController
@RequestMapping("/print")
public class WordTemplateController {
    @Autowired
    private IWordService iWordService;
    @PostMapping("/printDoc")
    public void printDoc(@RequestBody JSONObject param){
        iWordService.PrintDoc();
    }
    @GetMapping("/prieviewFile")
    public void prieviewFile(HttpServletResponse httpServletResponse
            , @RequestParam("fileName") String fileName){
        iWordService.prieviewFile(httpServletResponse,fileName);
    }
}
